<template>
  <div class="goods">
    <goods-list-item v-for="item in goods" :goods-item="item"/>
    <!--遍历list内的每一个小的item，再次传递到item专有的小组件中-->
  </div>
</template>

<script>
import GoodsListItem from '@/components/content/goods/GoodsListItem'

export default {
  name: "GoodsList",
  components: {
    GoodsListItem
  },
  props: {
    goods: {
      type: Array,
      default() {
        return []
      }
    }
  }
}
</script>

<style scoped>
.goods {
  display: flex;
  flex-wrap: wrap;
  /*根据宽度是否换行*/
  /*justify-content: space-evenly;*/
  /*!*如何分配顺着弹性容器主轴(或者网格行轴) 的元素之间及其周围的空间*!*/
  /*!*每个元素间隔相等*!*/

  justify-content: space-around;
  padding: 3px;

}
</style>
